define(['config/appregister'],function(app){
    app.directive("smallBanner",function($rootScope){
        return {
				templateUrl:"app/business/engDepartment/template/smallBanner.html",
            link:function(scope,element,attrs){
            	function autoScroll(){
					$(".newComment").animate({
					marginTop : "-25px"
					},500,function(){
					$(this).css({marginTop : "0px"}).find("li:first").appendTo(this);
					});
				}
				var scroll = setInterval(autoScroll,3000)
				$rootScope.$on('$stateChangeStart', function() {
					clearInterval(scroll);
				})
              }
           }
    });
});